//
//  LSZAlbumDetailsTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/5/16.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZAlbumDetailsTableViewCell.h"

@implementation LSZAlbumDetailsTableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imageViewCover = [[UIImageView alloc]init];
//        [self.imageViewCover.layer setMasksToBounds:YES];
//        [self.imageViewCover.layer setCornerRadius:3];
        self.imageViewCover.contentMode = UIViewContentModeScaleAspectFill;
        self.imageViewCover.clipsToBounds = YES;
        [self addSubview:self.imageViewCover];

        self.labelTitle = [[UILabel alloc]init];
        self.labelTitle.textColor = titleColorLSZ;
        [LSZSpecialPackaging setLabel_14_5_Size:self.labelTitle];
        [self addSubview:self.labelTitle];

        self.labelCoverName = [[UILabel alloc]init];
        self.labelCoverName.textColor = lightColor;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelCoverName font:13];
        [self addSubview:self.labelCoverName];

        self.butMove = [[UIButton alloc]init];
        self.butMove.hidden = YES;
        [self addSubview:self.butMove];

        UIImageView * imageViewMove = [[UIImageView alloc]init];
        imageViewMove.image = [UIImage imageNamed:@"类别"];
        [self.butMove addSubview:imageViewMove];

        if (ScreenWidth == 320) {
            //5
            self.imageViewCover.frame = CGRectMake(10, 5, 35, 35);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5,6, ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-28, 16);
            self.labelCoverName.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5, 3+CGRectGetMaxY(self.labelTitle.frame), ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-20, 14);
            self.butMove.frame = CGRectMake(ScreenWidth-50-10, 0, 60, 45);
            imageViewMove.frame =  CGRectMake(10,(self.butMove.frame.size.height-18)/2, 18, 18);
        }else if(ScreenWidth == 375){
            // 6 7
            self.imageViewCover.frame = CGRectMake(10,5, 40, 40);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5,7, ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-28, 17);
            self.labelCoverName.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5, 3+CGRectGetMaxY(self.labelTitle.frame), ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-20, 16);
            self.butMove.frame = CGRectMake(ScreenWidth-50-10, 0,60, 50);
            imageViewMove.frame =  CGRectMake(10,(self.butMove.frame.size.height-20)/2, 20, 20);
        }else {
            //plus
            self.imageViewCover.frame = CGRectMake(10,5, 44,44);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5,7, ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-28, 20);
            self.labelCoverName.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5, 3+CGRectGetMaxY(self.labelTitle.frame), ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-20, 18);
            self.butMove.frame = CGRectMake(ScreenWidth-50-10, 0,60, 58);
            imageViewMove.frame =  CGRectMake(10,(self.butMove.frame.size.height-22)/2, 22, 22);
        }
        //        self.imageViewHeadset = [[UIImageView alloc]init];
        //        self.imageViewHeadset.image = [UIImage imageNamed:@"耳机_次数"];
        //        [self addSubview:self.imageViewHeadset];
        //
        //        self.labelPlaysNumber = [[UILabel alloc]init];
        //        self.labelPlaysNumber.textColor = lightColor;
        //        [self addSubview:self.labelPlaysNumber];
//        if(ScreenWidth >=375){
            //            self.labelPlaysNumber.font = FONT_13;
            //            self.imageViewHeadset.frame = CGRectMake(CGRectGetMaxX(self.labelCoverName.frame)+5, CGRectGetMaxY(self.labelTitle.frame)+3,15,15);
            //            self.labelPlaysNumber.frame = CGRectMake(CGRectGetMaxX(self.imageViewHeadset.frame)+2, CGRectGetMaxY(self.labelTitle.frame)+3, ScreenWidth-CGRectGetMaxX(self.imageViewHeadset.frame)-2, 15);
//        }else{
            //            self.labelPlaysNumber.font = FONT_(12.5);
            //            self.imageViewHeadset.frame = CGRectMake(CGRectGetMaxX(self.labelCoverName.frame)+5, CGRectGetMaxY(self.labelTitle.frame)+3,13,13);
            //            self.labelPlaysNumber.frame = CGRectMake(CGRectGetMaxX(self.imageViewHeadset.frame)+2, CGRectGetMaxY(self.labelTitle.frame)+3, ScreenWidth-CGRectGetMaxX(self.imageViewHeadset.frame)-2, 13);
//        }

    }
    return self;
}
@end
